#ifndef PERSON_H
#define PERSON_H

#include <QObject>

class Person : public QObject
{
    Q_OBJECT
    Q_CLASSINFO("D-Bus interface", "io.github.add358.dbus.interface")

public:
    explicit Person(QObject *parent = nullptr);

signals:
    void nameChanged(QString);
    void ageChanged(int);

public slots:
    QString name() const {return m_name; }
    void setName(const QString &name) { m_name = name; emit nameChanged(name); }
    int age() const {return m_age;}
    void setAge(int age) { m_age = age; emit ageChanged(age); }

private:
    QString m_name;
    int m_age = 10;
};

#endif // PERSON_H
